//
//  LLStringMacrocDefine.h
//  LLFoundation
//
//  Created by my_liu on 2016/11/14.
//  Copyright © 2016年 . All rights reserved.
//

#import "LLStringUitil.h"

/**
 *  字符串是否为空
 */
#define LLStringIsNull(string) [LLStringUitil stringIsNull:string]

/**
 *  字符串是否全为空格
 */
#define LLStringIsAllWhiteSpace(string) [LLStringUitil stringIsAllWhiteSpace:string]

/**
 *  字符串转NSInteger
 */
#define LLStringToInt(string) [LLStringUitil stringToInt:string]

/**
 *  字符串转CGFloat
 */
#define LLStringToFloat(string) [LLStringUitil stringToFloat:string]

/**
 *  字符串转double
 */
#define LLStringToDouble(string) [LLStringUitil stringToDouble:string]

/**
 *  字符串转Bool
 */
#define LLStringToBool(string) [LLStringUitil stringToBool:string]

/**
 *  int转字符串
 */
#define LLStringFromInt(int) [LLStringUitil intToString:int]

/**
 *  float转字符串
 */
#define LLStringFromFloat(float) [LLStringUitil floatToString:float]

/**
 *  double转字符串
 */
#define LLStringFromDouble(double) [LLStringUitil doubleToString:double]

/**
 *  bool转字符串
 */
#define LLStringFromBool(bool) [LLStringUitil boolToString:bool]

/**
 *  字符串是否合法邮箱
 */
#define LLStringIsEmail(string) [LLStringUitil stringIsValidateEmailAddress:string]

/**
 *  字符串是否合法手机号码
 */
#define LLStringIsMobilePhone(string) [LLStringUitil stringISValidateMobilePhone:string]

/**
 *  字符串是否合法url
 */
#define LLStringIsUrl(string) [LLStringUitil stringIsValidateUrl:string]

/**
 *  字符串是否合法座机
 */
#define LLStringIsPhone(string) [LLStringUitil stringIsValidatePhone:string]

/**
 *  字符串是否合法邮政编码
 */
#define LLStringIsMailCode(string) [LLStringUitil stringIsValidateMailCode:string]

/**
 *  字符串是否合法身份证号
 */
#define LLStringIsPersonCardNumber(string) [LLStringUitil stringISValidatePersonCardNumber:string]

/**
 *  字符串是否合法车牌号
 */
#define LLStringIsCarNumber(string) [LLStringUitil stringISValidateCarNumber:string]

/**
 *  字符串是否只有中文字符
 */
#define LLStringChineseOnly(string) [LLStringUitil stringIsAllChineseWord:string]

/**
 *  字符串是否只有英文字符
 */
#define LLStringCharNumOnly(string) [LLStringUitil stringJustHasNumberAndCharacter:string]

/**
 *  字符串是否只包含字符，中文，数字
 */
#define LLStringCharNumChineseOnly(string) [LLStringUitil stringChineseNumberCharacterOnly:string]

/**
 *  字符串是否纯数字
 */
#define LLStringNumOnly(string) [LLStringUitil stringJustHasNumber:string]

//^(?=([0-9]{1,10}$|[0-9]{1,4}\.))(0|[1-9][0-9]*)(\.[0-9]{1,2})?$ 验证位数 四位 有效 数字+ 2位小数
#define LLStringIsFourNumberWithSecond(string) [LLStringUitil stringIsFourNumberWithSecond:string]

/**
 字符串是否只包含数字 字母
 */
#define LLStringNumOnlyAndEn(string) [LLStringUitil stringIsOnlyNumberAndEnCode:string]

/**
 *  从文件中读取出字符串
 */
#define LLStringFromFile(path) [LLStringUitil stringFromFile:path]

/**
 *  从归档路径读取出字符串
 */
#define LLStringUnArchieve(path) [LLStringUitil unarchieveFromPath:path]

/**
 *  获取一个当前时间戳字符串
 */
#define LLStringCurrentTimeStamp [LLStringUitil currentTimeStampString]

/**
 *  将字符串转为MD5字符串
 */
#define LLStringToMD5(string) [LLStringUitil MD5:string]

/**
 *  返回去除字符串首的空格的字符串
 */
#define LLStringClearLeadingWhiteSpace(string) [LLStringUitil stringByTrimingLeadingWhiteSpace:string]

/**
 *  返回去除字符串结尾的空格的字符串
 */
#define LLStringClearTailingWhiteSpace(string) [LLStringUitil stringByTrimingTailingWhiteSpace:string]

/**
 *  返回去除字符串中所有的空格的字符串
 */
#define LLStringClearAllWhiteSpace(string) [LLStringUitil stringByTrimingWhiteSpace:string]

/**
 *  Url编码对象,通常是字符串,返回编码后的字符串
 */
#define LLStringEncodeString(string) [LLStringUitil urlEncode:string]

/**
 *  Url解码
 */
#define LLStringDecodeString(string) [LLStringUitil urlDecode:string]

/**
 *  Url编码一个字典,键值对用@链接,返回编码后的字符串
 */
#define LLStringEncodeDict(aDict) [LLStringUitil encodeStringFromDict:aDict]

/**
 *  返回字符串范围
 */
#define LLStringRange(string) [LLStringUitil stringRange:string]

/**
 *  根据字典返回json字符串 失败就是nil
 */
#define LLJSONStringFromNSDict(dict) [LLStringUitil jsonStringFromNSDictionary:dict]

/**
 *  根据json字符串返回字典 失败就是nil
 */
#define LLDictionaryFromJSONString(string) [LLStringUitil dictionaryFromJSONString:string]

/**
 *  根据json字符串返回array 失败就是nil
 */
#define LLJSONStringFromNSArray(array) [LLStringUitil jsonStringFromNSArray:array]

/**
 *  根据array返回json字符串 失败就是nil
 */
#define LLArrayFromJSONString(string) [LLStringUitil arrayFromJSONString:string]

/**
 *  Unicode转UTF-8 中文表情 ✌️
 */
#define LLReplaceUnicodeString(string) [LLStringUitil replaceUnicode:string]

/**
 *  是否包含emoji标签
 *  @return YES 包含 NO 不包含
 */
#define LLStringIsContainEmoji(string) [LLStringUitil stringIsContainEmoji:string]
